<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
	<title>Processing.js test of xmlElement listChildren()</title>
	<script type="text/javascript" src="../../../processing.js"></script> 

</head>
<body>


	<script id="script" type="application/processing">
XMLElement xml;
var array[];
void setup() {
  size(200, 200);
  xml = new XMLElement(this, "sites2.xml");
  array = xml.listChildren();
  
  println(array);  // Prints "site"
}

	</script>
<h1>XMLElement Test8: listChildren() </h1>
<h3>Source</h3><pre>
// The following short XML file called "sites.xml" is parsed 
// in the code below. It must be in the project's "data" directory
//&lt;?xml version="1.0"?&gt; 
// &lt;websites&gt; 
//  &lt;site&gt; 
//   &lt;name&gt; Processing&lt;/name&gt; 
//   &lt;url&gt; www.processing.org&lt;/url&gt; 
//  &lt;/site&gt; 
// &lt;/websites&gt; 

XMLElement xml;
var array[];
void setup() {
  size(200, 200);
  xml = new XMLElement(this, "sites2.xml");
  array = xml.listChildren();
  
  println(array);  // Prints "site"
}
</pre>
<canvas id="display" style="width:10;height:10;"></canvas>
</body>
</html>

